/*	
 *				
 *					ISNW ---- It is a war.It is not warcraft!
 *
 *
 *					Author:					zhoukeli(haxixi_keli)
 *					Filename:				ISNW_Sprite.h
 *					CreateTime:				2008/11/25
 *					ModifyTime:				2008/11/25
 *					ModifyTime:				2008/11/25
 *
 */

#ifndef ISNW_SPRITE_H
#define ISNW_SPRITE_H

#include "../ISNW_Texture/ISNW_Texture.h"
#include <d3dx9core.h>

namespace ISNW
{
	class ISNW_Sprite
	{
	private:
		ISNW_Sprite();

	public:
		~ISNW_Sprite();

	public:
		static ISNW_Sprite* GetPtr();

		static ISNW_VOID InitSprite();

		ISNW_VOID Init();

		ISNW_VOID Draw(ISNW_Texture*);

		ISNW_VOID SetCenter(float x,float y){
			m_center = D3DXVECTOR2(x,y);
		}
		ISNW_VOID SetTranslate(float x,float y){
			m_translate = D3DXVECTOR2(x,y);
		}
		ISNW_VOID SetRotate(float angle){
			m_angle = angle;
		}
		ISNW_VOID SetScale(float x,float y){
			m_scale = D3DXVECTOR2(x,y);
		}
		ISNW_VOID SetAlpha(float a){
			m_alpha = a;
		}

		LPD3DXSPRITE GetSprite(){return m_sprite;}

	protected:
		D3DXVECTOR2				m_center;
		D3DXVECTOR2				m_translate;
		D3DXVECTOR2				m_scale;
		float					m_angle;
		ISNW_BYTE				m_alpha;

		LPD3DXSPRITE			m_sprite;
	};

	extern ISNW_Sprite*	g_pSprite;
}
#endif